import 'package:flutter/material.dart';

class MyApp6 extends StatelessWidget {
  const MyApp6({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Text组件的使用',
            style: TextStyle(fontSize: 18, color: Colors.white)),
        backgroundColor: Colors.red,
        centerTitle: true,
      ),
      body: const Text(
        '《春宵》 苏轼 \n 春宵一刻值千金，花有清香月有阴。\n 歌管楼台声细细，秋千院落夜沉沉。歌管楼台声细细，秋千院落夜沉沉。歌管楼台声细细，秋千院落夜沉沉。歌管楼台声细细，秋千院落夜沉沉。',
        style: TextStyle(
          fontSize: 20,
          color: Colors.orange,
          decoration: TextDecoration.underline, //装饰下划线
          decorationStyle: TextDecorationStyle.dashed,
          decorationColor: Color.fromARGB(255, 167, 235, 234),
          decorationThickness: 2, //装饰线粗细
          fontWeight: FontWeight.bold, // 字体粗细
          fontStyle: FontStyle.normal, //字体风格
          height: 2, //行高
        ),
        textAlign: TextAlign.center, //对齐方式
        maxLines: 3,
        overflow: TextOverflow.ellipsis,
      ),
    );
  }
}
